"use client";

import Link from "next/link";
import ImgTest from "@/app/components/img";
import { getInvite } from "@/api/inviteAPI";
import { useEffect } from "react";
export default async function Page() {
  const fetchData = async () => {
    console.log("222222");
    const res = await getInvite({ invite_code: "123456" });
    console.log(res, "res");
  };
  //   const posts = await getPosts();
  useEffect(() => {
    fetchData();
  }, []);
  return (
    <>
      <div className="flex items-center justify-center !text-['#ddd'] size-[20px] w-full h-[50px] bg-amber-700">
        test
      </div>
      <ul>
        {/* {posts.map((post) => (
        <Post key={post.id} post={post} />
      ))} */}
        <li>
          <h1>Hello</h1>

          <Link className="!text-['#ddd'] size-[16px]" href={`/blog/slug`}>
            ddd
          </Link>
        </li>
      </ul>

      <ImgTest />
    </>
  );
}
